//
// Created by 86138 on 2025/6/12.
//


#include "LinkStack.h"
#include <iostream>
#define OCT 8

using namespace std;
namespace sweetcookie3_1 {
    void Convert() {
        LinkStack S;
        InitLinkStack(S);
        int N;
        cout << "输入一个正整数：";
        cin >> N;
        while (N) {
            Push(S, N % OCT);
            N /= OCT;
        }
        cout << "8进制数为：";
        while (!StackEmpty(S)) {
            SElemType e;
            Pop(S, e);
            cout << e;
        }
        cout<<endl;
    }

}

//using namespace sweetcookie3_1;
//int main() {
//    system("chcp 65001");
//    Convert();
//    return 0;
//}